Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container transition to MANIFEST_PULLED state should happen after network pause container reaches RESOURCES_PROVISIONED state #4286

Merged
merged 8 commits into from
Aug 15, 2024

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented Aug 15, 2024

Summary

Make awsvpc task containers' transition to MANIFEST_PULLED state depend on the network pause container reaching RESOURCES_PROVISIONED (RUNNING state for the pause container) state. This is because transition to MANIFEST_PULLED state may involve an image repository call which needs to be routed through the network pause container for some setups.

Also update existing task engine tests for awsvpc tasks to ensure that for an awsvpc task, any DockerClient method calls that may call an image repository, happen after the network pause container has reached RESOURCES_PROVISIONED state. This should prevent similar bugs from happening in the future.

Testing

Updated unit tests.

Ran an awsvpc network mode task and observed in Agent logs that the pause container reaches RESOURCES_PROVISIONED state before the task container transitions to MANIFEST_PULLED state.

New tests cover the changes: yes

Description for the changelog

Does this PR include breaking model changes? If so, Have you added transformation functions?

Bugfix: AWSVPC task containers' transition to MANIFEST_PULLED state should depend on the network pause container reaching RESOURCES_PROVISIONED state.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@amogh09 amogh09 changed the base branch from master to dev August 15, 2024 01:13
@amogh09 amogh09 force-pushed the docker-pause-container-test branch 2 times, most recently from 437ed1f to 265eb4f Compare August 15, 2024 18:00
@amogh09 amogh09 changed the title Container transition to MANIFEST_PULLED state should happen after network pause container is reaches ContainerResourcesProvisioned state Container transition to MANIFEST_PULLED state should happen after network pause container reaches ContainerResourcesProvisioned state Aug 15, 2024
@amogh09 amogh09 changed the title Container transition to MANIFEST_PULLED state should happen after network pause container reaches ContainerResourcesProvisioned state Container transition to MANIFEST_PULLED state should happen after network pause container reaches RESOURCES_PROVISIONED state Aug 15, 2024
@amogh09 amogh09 marked this pull request as ready for review August 15, 2024 18:56
@amogh09 amogh09 requested a review from a team as a code owner August 15, 2024 18:56
@amogh09 amogh09 force-pushed the docker-pause-container-test branch from 57199c0 to fad3fc7 Compare August 15, 2024 20:41
Yiyuanzzz
Yiyuanzzz previously approved these changes Aug 15, 2024
singholt
singholt previously approved these changes Aug 15, 2024
agent/engine/docker_task_engine_linux_test.go Outdated Show resolved Hide resolved
@amogh09 amogh09 dismissed stale reviews from singholt and Yiyuanzzz via bf79ae1 August 15, 2024 22:07
@amogh09 amogh09 merged commit 6c7758d into aws:dev Aug 15, 2024
40 checks passed
danehlim added a commit to danehlim/amazon-ecs-agent that referenced this pull request Aug 17, 2024
…fter network pause container reaches RESOURCES_PROVISIONED state (aws#4286)"

This reverts commit 6c7758d.
harishxr pushed a commit that referenced this pull request Aug 18, 2024
* Revert "Expose FaultInjection status in TaskResponse (#4285)"

This reverts commit fd3693c.

* Revert "Implementing network blackhole port handler"

This reverts commit 177dbd2.

* Revert "TaskStopVerificationACKResponder integration tests (#4282)"

This reverts commit d6fbc04.

* Revert "Container transition to MANIFEST_PULLED state should happen after network pause container reaches RESOURCES_PROVISIONED state (#4286)"

This reverts commit 6c7758d.
@danehlim danehlim mentioned this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants